/*
-------------------------------------------------------------------
BIE is Copyright 2001-2004 Brunswick Corp.
-------------------------------------------------------------------
Please read the legal notices (docs/legal.txt) and the license
(docs/bie_license.txt) that came with this distribution before using
this software.
-------------------------------------------------------------------

*/
/*
 * TestPop.java
 *
 * Created on February 13, 2003, 2:32 PM
 */

//package com.webdeninteractive.xbotts.client.serviceproviders;
import java.util.*;
import java.util.Properties;
import java.net.*;
import java.io.*;
import java.lang.*;

import javax.mail.*;
import javax.mail.internet.*;
/**
 *
 * @author  siewean
 */
public class TestPop {
    
    /** Creates a new instance of TestPop */
    public TestPop() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        DownloadPOP3Email email = new DownloadPOP3Email("pop.126.com","huhj2008","hhj123");
        String[] msg = email.DownloadAllEmails(true,".\\mypop3");
        int length;
        if(msg==null)
        	length = 0;
        else
        	length=msg.length;
        
        int i=0;
        while(i<length)
        {
        	System.out.println("Email body is "+ msg[i]);
        }
    }
}
